/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DTO;

/**
 * This class acts as data transfer abstraction for ship method object attributes. It encapsulates address attributes.
 * This object is transferred back and forth amongst various layers.
 * @author tejinder
 * @see DTO
 */
public class ShippingMethod {

    private int id;
    private String type;
    private String area;
    private int maxQty;
    private int duration;
    private double cost;

    /**
     * default constructor
     */
    public ShippingMethod() {
        id = 0;
        type = "";
        area = "";
        maxQty = 0;
        duration = 0;
        cost = 0.00;
    }

    /**
     * parameterized constructor
     * @param id an integer shipping id
     * @param type a string shipping type
     * @param area string area
     * @param maxQty integer for maximum quantity of items
     * @param duration integer
     * @param cost double
     */
    public ShippingMethod(int id, String type, String area, int maxQty,
            int duration, double cost) {
        this.id = id;
        this.type = type;
        this.area = area;
        this.maxQty = maxQty;
        this.duration = duration;
        this.cost = cost;
    }

    /**
     * gets shipping id
     * @return
     */
    public int getID() {
        return id;
    }

    /**
     * gets type
     * @return
     */
    public String getType() {
        return type;
    }

    /**
     * gets shipping area
     * @return
     */
    public String getArea() {
        return area;
    }

    /**
     * gets maximum quantity
     * @return
     */
    public int getMaxQTY() {
        return maxQty;
    }

    /**
     * gets duration
     * @return
     */
    public int getDuration() {
        return duration;
    }

    /**
     * gets cost
     * @return
     */
    public double getCost() {
        return cost;
    }

    /**
     * toString() method overrides the default behavior of Object class toString() method.
     * @return  a string representing the state of object
     */
    public String toString() {
        return type + " " + area +  " $" + cost;
    }

    /**
     * sets shipping id
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * sets type
     * @param type the type to set
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * sets area
     * @param area the area to set
     */
    public void setArea(String area) {
        this.area = area;
    }

    /**
     * sets maximum quantity
     * @param maxQty the maxQty to set
     */
    public void setMaxQty(int maxQty) {
        this.maxQty = maxQty;
    }

    /**
     * sets duration
     * @param duration the duration to set
     */
    public void setDuration(int duration) {
        this.duration = duration;
    }

    /**
     * sets cost
     * @param cost the cost to set
     */
    public void setCost(double cost) {
        this.cost = cost;
    }
}
